// Controller
package com.example.demo.controller;

import com.example.demo.dto.ClazzManagementResultDTO;
import com.example.demo.service.ClazzManagementService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/clazz-management")
@CrossOrigin
public class ClazzManagementController {

    @Autowired
    private ClazzManagementService clazzManagementService;

    @Operation(summary = "获取所有班级及学生MBTI测试记录")
    @GetMapping
    public List<ClazzManagementResultDTO> getClazzRecords() {
        return clazzManagementService.getAllClazzResults();
    }
}
